/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class LibroDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression lib_id;
	public final StringExpression lib_fecha_creacion;
	public final StringExpression lib_estado;
	public final StringExpression lib_direccion;
	public final StringExpression lib_clave;
	
	public LibroDetachedCriteria() {
		super(orm.Libro.class, orm.LibroCriteria.class);
		lib_id = new IntegerExpression("lib_id", this.getDetachedCriteria());
		lib_fecha_creacion = new StringExpression("lib_fecha_creacion", this.getDetachedCriteria());
		lib_estado = new StringExpression("lib_estado", this.getDetachedCriteria());
		lib_direccion = new StringExpression("lib_direccion", this.getDetachedCriteria());
		lib_clave = new StringExpression("lib_clave", this.getDetachedCriteria());
	}
	
	public LibroDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.LibroCriteria.class);
		lib_id = new IntegerExpression("lib_id", this.getDetachedCriteria());
		lib_fecha_creacion = new StringExpression("lib_fecha_creacion", this.getDetachedCriteria());
		lib_estado = new StringExpression("lib_estado", this.getDetachedCriteria());
		lib_direccion = new StringExpression("lib_direccion", this.getDetachedCriteria());
		lib_clave = new StringExpression("lib_clave", this.getDetachedCriteria());
	}
	
	public EmpresaDetachedCriteria createEmpresaemCriteria() {
		return new EmpresaDetachedCriteria(createCriteria("empresaem"));
	}
	
	public ResultadoDetachedCriteria createResultadoCriteria() {
		return new ResultadoDetachedCriteria(createCriteria("ORM_Resultado"));
	}
	
	public Libro uniqueLibro(PersistentSession session) {
		return (Libro) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Libro[] listLibro(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Libro[]) list.toArray(new Libro[list.size()]);
	}
}

